/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package hangmangame;

/**
 *
 * @author Joana
 */
public class HangManController {

    protected HangManGame game;
    protected IHangManView view;
    protected int viewMode = 2;

    public HangManController() {
        game = new HangManGame();
    }

    public void loadView() {
        switch (viewMode) {
            case 2:
                view = new HangManFrameView();
                break;
            default:
                view = new HangManConsoleView();
        }
        view.setGame(game);
    }
    
    public void gameStart() {
        loadView();
        view.start();
        view.display();
    }
}
